package bigdata;

import java.util.Date;

import com.google.gson.JsonArray;
import com.google.gson.JsonObject;

/*
 * the VisitData class contains all the user information from a single tuple.
 */
public class VisitData {

	public int rate = 0;
	public float score = 0;
	public String type;

	public Integer numOfSearchesInGivenTime = 0;
	public Integer numOfPageVisitsInGivenTime = 0;
	public boolean timeOnSiteMoreThenAVG = false;
	
	long ownerAccountId = 0;
	String visitId;
	String ip;
	IpLocation location;
	String browser;
	long timeOnCurrentPage;
	String os;
	//String flashPlayerVersion;
	//boolean hasRequiredFlashPlayerVersion;
	String host;
	JsonObject currentPathname;
	String currentQueryString;
	String referrer;
	String searchQuery;
	String referrerType;
	String landingPage;
	Date onSiteSince;
	Date lastIsAlive;
	int numberOfVisitedPages = 0;
	JsonArray visitedPagesHistory;
	boolean usedVSBefore;
	boolean isFirstVisit;
	int numberOfVisitsInSite = 0;
	boolean invited;
	boolean ignoredInvitaion;
	long invitingAgentAc;
	int status;
	String visitScoreCalcClass;
	boolean disableMonitoringKeepAlive;
	Date callingSince;
	String name;
	String phone;
	String email;
	String topic;
	String sessionId;
	boolean isSupported;
	boolean isBrowserWebRTCSupported;
	boolean isAnyExpertOnline = false;
	boolean isButtonVisible = false;
	boolean isMessageLeft = false;
	boolean saveVisit = true;
	String country;
	String continent;

	public VisitData(long ownerAccountId, String visitId, String ip, String browser, String os, String referrer, String landingPage, Date onSiteSince, Date lastIsAlive, int numberOfVisitedPages, Boolean usedVSBefore, Boolean isFirstVisit, int numberOfVisitsInSite, Boolean invited, Boolean ignoredInvitaion, int status, String country, String continent, long timeOnCurrentPage,String searchQuary) {
		super();
		this.ownerAccountId = ownerAccountId;
		this.visitId = visitId;
		this.ip = ip;
		this.browser=browser;
		this.os=os;
		this.referrer=referrer;
		this.landingPage=landingPage;
		this.onSiteSince=onSiteSince;
		this.lastIsAlive=lastIsAlive;
		this.numberOfVisitedPages=numberOfVisitedPages;
		this.usedVSBefore=usedVSBefore;
		this.isFirstVisit=isFirstVisit;
		this.numberOfVisitsInSite=numberOfVisitsInSite;
		this.invited=invited;
		this.ignoredInvitaion=ignoredInvitaion;
		this.status=status;
		this.country= country;
		this.continent=continent;
		this.timeOnCurrentPage = timeOnCurrentPage;
		this.searchQuery=searchQuary;
	}

	public VisitData(String visitId) {
		super();
		this.ownerAccountId = 0;
		this.visitId = visitId;
		this.score = 0;
		this.rate = 0;
		this.browser = "";
		this.os = "";
		this.timeOnCurrentPage = 1;
	}
		
	
	public int getRate() {
		return rate;
	}
	public void setRate(int rate) {
		this.rate = rate;
	}

	public float getScore() {
		return score;
	}

	public void setScore(float score) {
		this.score = score;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

}
